﻿<%@ Page Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="Cursos_Listar.aspx.cs"
    Inherits="ProjetoJornada.Interno.Cursos_Listar" Title="Gerenciar Cursos" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <script src="../javascript/menu_dropdown.js" type="text/javascript"></script>

    <link href="../CSS/cadastro.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .style1
        {
            width: 151px;
        }
        .style2
        {
            width: 202px;
        }
        .style3
        {
            width: 120px;
        }
        #ctl00_ContentPlaceHolder1_btnCarregador
        {
            visibility: collapse;
        }
    </style>
    
    <script src="../javascript/jquery-1-3-2.min.js" type="text/javascript"></script>

    <script type="text/javascript">
        $(document).ready(
            function()
            {
                $('#ctl00_ContentPlaceHolder1_btnCarregador').click();
            }
         );
    </script>
    
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel runat="server">
    <ContentTemplate>
    <asp:Image ID="imagemCarregando" ImageUrl="~/imagens/ajax-loader.gif" runat="server" />
    <asp:Label ID="lblCarregando" runat="server" Text="carregando cursos..."></asp:Label>
    <asp:Label ID="lblAviso" runat="server" Text=""></asp:Label><br />
    <asp:HyperLink ID="hlCadastrar" runat="server" Visible="false" NavigateUrl="Curso_Cadastro.aspx">Cadastrar Novo Curso</asp:HyperLink>
    <asp:GridView ID="GridView_Cursos" runat="server" AutoGenerateColumns="False" 
        onrowdeleting="GridView_Cursos_RowDeleting" BackColor="White" 
        BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" CellPadding="3" 
        ForeColor="Black" GridLines="Vertical">
        <Columns>
            <asp:BoundField AccessibleHeaderText="Id" DataField="Id" HeaderText="Id" 
                Visible="False" />
            <asp:BoundField AccessibleHeaderText="Nome" DataField="Nome" HeaderText="Nome" 
                NullDisplayText="-" />
            <asp:BoundField AccessibleHeaderText="PreRequisitos" DataField="PreRequisitos" 
                HeaderText="Pré-requisitos" NullDisplayText="-" />
            <asp:BoundField AccessibleHeaderText="CargaHoraria" DataField="CargaHoraria" 
                HeaderText="Carga horária" NullDisplayText="-" />
            <asp:BoundField AccessibleHeaderText="Ementa"  DataField="Ementa" 
                HeaderText="Ementa" NullDisplayText="-" />
            <asp:BoundField AccessibleHeaderText="PublicoAlvo" DataField="PublicoAlvo" 
                HeaderText="Público alvo" NullDisplayText="-" />
            <asp:BoundField AccessibleHeaderText="Descricao" DataField="Descricao" 
                HeaderText="Descrição" NullDisplayText="-" />
            
            <asp:TemplateField>
                <ItemTemplate>
                    <a href='<%#"Curso_Editar.aspx?id=" + Eval("Id")%>'>
                        <asp:Image ID="imgEdit" runat="server" BorderStyle="None" ImageUrl="../imagens/edit.png" />
                    </a>
                </ItemTemplate>
                <ItemStyle Height="20px" HorizontalAlign="center"/>
            </asp:TemplateField>            
            
            <asp:CommandField ShowDeleteButton="True" ButtonType="Image" 
                DeleteImageUrl="~/imagens/delete.png" DeleteText="" >
                <ItemStyle HorizontalAlign="Center" />
            </asp:CommandField>
        </Columns>
        <FooterStyle BackColor="#CCCCCC" />
        <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
        <AlternatingRowStyle BackColor="#CCCCCC" />
    </asp:GridView>
    <asp:Button ID="btnCarregador" runat="server" Text="Button" 
            onclick="btnCarregador_Click" />
    </ContentTemplate>
</asp:UpdatePanel>

</asp:Content>
